using System.Text.RegularExpressions;
using ETestIT.Core.Infrastructure;
using NHibernate.Validator.Constraints;
using SharpArch.Core.NHibernateValidator;
using SharpArch.Core.PersistenceSupport;
using SharpArch.Core.DomainModel;
using System;

namespace ETestIT.Core
{
    [HasUniqueDomainSignature]
    public class Candidate : Entity
    {
        public Candidate() { }

        [DomainSignature]
        [NotNullNotEmpty]
        [Length(3, 32)]
        [Pattern(@"\w", RegexOptions.Compiled, "spaces are not allowed as value")]
		public virtual string FirstName { get; set; }

        [DomainSignature]
        [NotNullNotEmpty]
        [Length(3, 32)]
        [Pattern(@"\w", RegexOptions.Compiled, "spaces are not allowed as value")]
		public virtual string Surename { get; set; }

        [Email]
		public virtual string Email { get; set; }

        [Length(3, 32)]
		public virtual string Phone { get; set; }

		public virtual CandidateCategories Category { get; set; }

		[NotNull]
		public virtual JobTitle ProfileTitle { get; set; }

        public virtual string RecrutedBy { get; set; }
    }

    public enum CandidateCategories
    {
        Employees,
        External,
    } ;
}
